<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        #app {
            margin: auto;
            width: 500px;
            height: 100%;
        }
        .title {
            font-size: 30px;
            font-weight: bolder;
        }
        .inbox {
            /* height: 600px; */
            width: 100%;
        }
        input {
            display: block;
            width: 300px;
            height: 30px;
            padding-left: 10px;
            box-sizing: border-box;
            margin-top: 10px;
            outline: none;
            border: none;
            border-bottom: 1px solid plum;
        }
        button {
            border: 1px solid palegreen;
            background-color: palegoldenrod;
            width: 300px;
            height: 30px;
            line-height: 30px;
            text-align: center;
            border-radius: 10px;
            margin-top: 20px;
        }
    </style>
</head>
<!-- v-model 专门用于表单元素值的绑定 , 是一个双向绑定指令 -->
<body>
    <div id="app">
        <div class="title">密码登录</div>
        <div class="inbox">
            <input type="text" placeholder="手机号/用户名" v-model="value.name">
            <input type="password" placeholder="密码" v-model="value.pass">
        </div>
        <button @click="get()">登录</button>
    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script>
    var v = new Vue({
        el:'#app',
        data:{
            value:{name:'',pass:''}
        },
        methods:{
            get(){
                console.log(this.value);
            }
        }
    })
</script>